package com.hm.could.nacos;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author huangmai
 * @Title: ConfigAplication
 * @ProjectName spring-cloud-alibaba
 * @Description: nacos 配置中心，主要要将配置写在bootstrap.yml中，否则找不到配置
 * @date 2021/10/1410:26
 */

@RequestMapping("config")
@RestController
@SpringBootApplication
@EnableDiscoveryClient
public class ConfigApplication {


    @Value("${app.msg}")
    private String msg;

    @GetMapping("/msg")
    public String getConfig(){
        return msg;
    }


    public static void main(String[] args) {
        SpringApplication.run(ConfigApplication.class,args);
    }


}
